# Maintainer: David Macek <david.macek.0@gmail.com>

_realname=nimble
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=0.6.2
pkgrel=1
pkgdesc='Package manager for the Nim programming language (mingw-w64)'
arch=('any')
url='https://github.com/nim-lang/nimble'
license=('BSD')
makedepends=('git'
             "${MINGW_PACKAGE_PREFIX}-nim")
source=("${_realname}::git+https://github.com/nim-lang/nimble.git#tag=v${pkgver}")
sha256sums=('SKIP')

build() {
  cd "${srcdir}/${_realname}/src"

  nim c -d:release nimble.nim
}

package() {
  cd "${srcdir}/${_realname}"

  cp "src/nimble.exe" "${pkgdir}${MINGW_PREFIX}/bin"
  cp "license.txt" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
}
